<?
/**
* @package mySportSite
* @author Brandon Aubie <brandon@mysportsite.com>
* @copyright Copyright (c) 2007 mySportSite Inc.
*/

function refreshPage($page, $returnvars=false)
{
    if(count(ob_get_status()) > 0) ob_end_clean();
    $vars = "";
    $anchor = "";
    if ($returnvars != false)
    {
        foreach ($returnvars as $k=>$v)
        {
            if ($k != "__anchor")
                $vars .= '&'.$k.'='.urlencode($v);
            else
                $anchor = "#".$v;
        }
    }
    header("Location: index.php?p=$page".$vars.$anchor);
    exit;
}
?>
